#ifdef SUPPORT_MS_EXTENSIONS
#pragma bss_seg(".icsd_aeq.data.bss")
#pragma data_seg(".icsd_aeq.data")
#pragma const_seg(".icsd_aeq.text.const")
#pragma code_seg(".icsd_aeq.text")
#endif

#include "app_config.h"
#include "audio_config_def.h"

#if (TCFG_AUDIO_ADAPTIVE_EQ_ENABLE && TCFG_AUDIO_ANC_ENABLE && \
	 TCFG_AUDIO_ANC_EXT_VERSION == ANC_EXT_V2) && \
	(defined TCFG_EQ_ENABLE)

#include "icsd_aeq_config.h"

//HT03
//u8 sz_ref_test[480] = {
//    0x49, 0xE8, 0xFD, 0x3E, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x60, 0x94, 0xBF, 0x2E, 0x76, 0x87, 0xBE,
//    0x8D, 0xB4, 0x5D, 0xBF, 0x09, 0x7F, 0xB3, 0x3C, 0xF1, 0x0F, 0x4A, 0xBF, 0x2A, 0x0E, 0x25, 0x3E,
//    0x00, 0x26, 0x35, 0xBF, 0xFC, 0x5D, 0x26, 0x3E, 0x5C, 0xEC, 0x2A, 0xBF, 0x31, 0x36, 0x1D, 0x3E,
//    0x42, 0x56, 0x25, 0xBF, 0xFA, 0xFB, 0x0E, 0x3E, 0x1E, 0x05, 0x21, 0xBF, 0xA9, 0x5B, 0x06, 0x3E,
//    0xE5, 0x17, 0x1C, 0xBF, 0xA8, 0x0D, 0xFD, 0x3D, 0x30, 0x25, 0x16, 0xBF, 0xAB, 0xEF, 0xE0, 0x3D,
//    0x85, 0x77, 0x11, 0xBF, 0x6F, 0xAC, 0xD1, 0x3D, 0x3E, 0x1D, 0x0F, 0xBF, 0xA6, 0x67, 0xE0, 0x3D,
//    0x94, 0x66, 0x09, 0xBF, 0x64, 0x48, 0xBE, 0x3D, 0x0A, 0x80, 0x06, 0xBF, 0x6E, 0xAE, 0xC2, 0x3D,
//    0xC5, 0x99, 0xFE, 0xBE, 0x7A, 0x56, 0x93, 0x3D, 0x29, 0x73, 0xF9, 0xBE, 0x0B, 0xBA, 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, 0x1B, 0xBE,
//    0xFD, 0x28, 0x25, 0xBF, 0xCA, 0xCE, 0x00, 0xBE, 0x0D, 0x42, 0x2D, 0xBF, 0x7E, 0x65, 0x03, 0xBE,
//    0x0E, 0xB4, 0x3D, 0xBF, 0xE7, 0x43, 0x21, 0xBE, 0x4B, 0x53, 0x36, 0xBF, 0xB8, 0x23, 0x1A, 0xBE,
//    0xF4, 0x74, 0x1F, 0xBF, 0x61, 0xEA, 0x83, 0x3C, 0xE5, 0x28, 0x1D, 0xBF, 0x62, 0x6A, 0x54, 0x3B,
//    0xF4, 0x1C, 0x36, 0xBF, 0xA7, 0x6D, 0x82, 0xBD, 0xFE, 0x94, 0x32, 0xBF, 0xA6, 0x6F, 0x08, 0xBE,
//    0x34, 0xC6, 0x28, 0xBF, 0xAE, 0xA4, 0xA0, 0xBC, 0xC3, 0x5B, 0x27, 0xBF, 0x46, 0x8B, 0xF3, 0x3A,
//    0x6B, 0x59, 0x41, 0xBF, 0xD3, 0x56, 0x52, 0xBE, 0x4A, 0x77, 0x52, 0xBF, 0xEB, 0x94, 0x8D, 0xBE,
//    0x0A, 0x0D, 0x39, 0xBF, 0x27, 0x63, 0x77, 0xBE, 0x21, 0x07, 0x30, 0xBF, 0xE8, 0xCA, 0x0C, 0xBE,
//    0x37, 0x32, 0x22, 0xBF, 0x67, 0xC2, 0x18, 0xBD, 0x45, 0x93, 0x23, 0xBF, 0x53, 0xE5, 0x67, 0xBA,
//    0xB7, 0x85, 0x75, 0xBF, 0xD9, 0x6A, 0xA9, 0xBE, 0xBF, 0x5B, 0x80, 0xBF, 0x73, 0x3E, 0xC4, 0xBE,
//    0x47, 0xF6, 0x79, 0xBF, 0x8E, 0x56, 0xB9, 0xBE, 0x24, 0xAA, 0x2D, 0xBF, 0x6D, 0x3C, 0xA2, 0x3B,
//    0x48, 0xB3, 0x54, 0xBF, 0xC4, 0xE8, 0x1F, 0xBE, 0xCA, 0x36, 0x90, 0xBF, 0xE7, 0xD8, 0xBB, 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x9B, 0x8F, 0xBE, 0xDB, 0xC7, 0xAF, 0x3D, 0xF0, 0x53, 0x72, 0xBE, 0x02, 0x85, 0xBF, 0xBC, */
/* 0xD4, 0xBF, 0x30, 0xBE, 0x12, 0x34, 0x5C, 0x3E, 0xC3, 0x70, 0x26, 0x3D, 0x53, 0xE8, 0xA5, 0x3E, */
/* 0x2D, 0xA6, 0x5D, 0xBE, 0xFD, 0x17, 0xB0, 0x3C, 0xC6, 0xFD, 0x77, 0xBE, 0xF4, 0x1B, 0x2E, 0xBC, */
/* 0x94, 0xB4, 0x58, 0x3C, 0x5D, 0x94, 0x73, 0x3E, 0xBB, 0x4F, 0xCE, 0x3D, 0x50, 0x96, 0x95, 0x3E, */
/* 0x04, 0x94, 0xAF, 0x3D, 0x7D, 0x6E, 0x42, 0x3E, 0xA5, 0x33, 0xCE, 0xBD, 0xE9, 0x2D, 0x1A, 0x3E, */
/* 0xCA, 0x83, 0x21, 0xBE, 0x52, 0xE7, 0xCD, 0xBC, 0xAB, 0x29, 0x5A, 0xBE, 0x1F, 0x73, 0x24, 0xBC, */
/* 0x9E, 0x2B, 0x14, 0x3D, 0xC8, 0x23, 0x30, 0x3E, 0x6E, 0x42, 0x95, 0x3D, 0x08, 0x3F, 0x50, 0x3E, */
/* 0x45, 0x7C, 0x12, 0x3D, 0x07, 0x38, 0x2F, 0x3E, 0xB2, 0x05, 0x4C, 0xBE, 0xFF, 0xD9, 0x81, 0xBB, */
/* 0xB9, 0x46, 0x14, 0xBE, 0x9E, 0xAA, 0x25, 0x3D, 0x34, 0x49, 0x3D, 0x3B, 0xB7, 0x38, 0x18, 0x3E */
/* }; */
u8 sz_ref_test[480] = {
    0xBE, 0x8F, 0x24, 0x40, 0x55, 0x03, 0x55, 0xBF, 0xBE, 0x8F, 0x24, 0x40, 0x55, 0x03, 0x55, 0xBF,
    0xBE, 0x8F, 0x24, 0x40, 0x55, 0x03, 0x55, 0xBF, 0xBE, 0x8F, 0x24, 0x40, 0x55, 0x03,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0xB7, 0x12, 0x3C, 0x53, 0x2C, 0x25, 0xBE, 0xFB, 0xED, 0x99, 0x3D, 0x6B, 0x12, 0x14, 0xBE,
    0x64, 0x4D, 0xD4, 0x3D, 0xF1, 0x8F, 0x02, 0xBE, 0x94, 0xAF, 0xBC, 0x3D, 0x3D, 0x93, 0x0D, 0xBE,
    0xFF, 0x7A, 0xB4, 0x3D, 0x9E, 0x9D, 0x11, 0xBE, 0x6C, 0x04, 0x06, 0x3E, 0xE0, 0x35, 0xD5, 0xBD,
    0x87, 0x1E, 0xD2, 0x3D, 0x16, 0x92, 0x0A, 0xBE, 0x2C, 0x9D, 0x07, 0x3E, 0x15, 0x89, 0xF2, 0xBD,
    0xE3, 0x75, 0xEA, 0x3D, 0x06, 0x37, 0x1F, 0xBE, 0x06, 0xA2, 0x14, 0x3E, 0xBD, 0x9B, 0xAF, 0xBD,
    0x28, 0x97, 0x33, 0x3E, 0x67, 0xA5, 0x21, 0xBE, 0x91, 0x56, 0x36, 0x3E, 0xD5, 0x7E, 0x15, 0xBE
};

float target_headset[] = {
    -1.26613306999207,
    0,
    1.29007017612457,
    -0.399170428514481,
    1.09590363502502,
    -0.566947698593140,
    0.968523621559143,
    0.0879792645573616,
    1.00884807109833,
    0.0989049896597862,
    0.903554975986481,
    -0.208109378814697,
    0.821808040142059,
    -0.432587444782257,
    0.976746439933777,
    -0.415590167045593,
    1.36544895172119,
    -0.571391701698303,
    1.03759169578552,
    -0.668144047260284,
    0.812964975833893,
    -0.920850872993469,
    0.625642538070679,
    -0.871845006942749,
    0.522194266319275,
    -1.24380576610565,
    0.180414810776711,
    -1.18467247486115,
    0.0399386920034885,
    -0.992823660373688,
    0.00506550306454301,
    -0.940084934234619,
    -0.223890930414200,
    -0.422134518623352,
    -0.277251750230789,
    -0.501920580863953,
    0.0310126990079880,
    -0.183354556560516,
    -0.0766014903783798,
    -0.450031101703644,
    -0.278878897428513,
    -0.330928385257721,
    0.103441044688225,
    -0.197364404797554,
    -0.240248218178749,
    -0.301621764898300,
    0.0766767114400864,
    -0.140872210264206,
    -0.0355876833200455,
    -0.471913218498230,
    -0.285364866256714,
    -0.373738676309586,
    -0.184786856174469,
    -0.122427091002464,
    -0.272472977638245,
    -0.123540550470352,
    0.0377137176692486,
    0.134179249405861,
    -0.0351587422192097,
    -0.0227522328495979,
    -0.0642402097582817,
    0.170315265655518,
    0.0940740928053856,
    -0.0747030749917030,
    -0.0981941074132919,
    0.0722286999225617,
    0.220503553748131,
    0.0798819661140442,
    0.0271393954753876,
    -0.0669196471571922,
    0.0767505168914795,
    -0.0129122845828533,
    0.00923444330692291,
    0.0311000999063253,
    0.0966158360242844,
    0.0289275012910366,
    -0.0914073660969734,
    0.0915066152811050,
    0.179985076189041,
    0.166107028722763,
    -0.0241925884038210,
    -0.130944207310677,
    0.180103585124016,
    0.139436960220337,
    0.254765808582306,
    0.110730715095997,
    0.0801653712987900,
    -0.0200918167829514,
    -0.167550966143608,
    0.130976498126984,
    -0.0680077075958252,
    -0.0927380323410034,
    0.323040366172791,
    0.271800875663757,
    0.164456933736801,
    0.00644053472205997,
    0.261365741491318,
    -0.169278740882874,
    0.0705433636903763,
    -0.152010306715965,
    -0.0325013846158981,
    0.125482097268105,
    -0.181693941354752,
    0.0730891525745392,
    0.328756153583527,
    -0.193436473608017,
    0.168113097548485,
    0.263000756502152,
    -0.0780562460422516,
    0.230836555361748,
    0.195176661014557,
    0.0262031294405460,
    0.450678616762161,
    0.221710681915283,
    -0.245069056749344,
    0.0775282829999924,
    0.110736660659313,
    -0.360450536012650,
    -0.0556959658861160,
    0.0307539198547602,
};

const int AEQ_objFunc_type = 2;
const float AEQ_GAIN_LIMIT_ALL = 20;

/***************************************************************/
// aeq
/***************************************************************/
const int aeq_type[] = { 2, 2, 2, 2, 2, 2, 2, 2, 4, 2 };
const float AEQ_Vrange_M[] = {   // 62
    0, 20, 200,   500,  0.4, 1.0,
    -2, 20, 500,  800,  0.5, 1.0,
    1, 1,

    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0,
};

const float AEQ_Biquad_init_M[] = { // 217
    0, 3076, 1.2,
    0, 400,  1.0,
    0, 400,  1.0,
    0, 700,  1.0,
    0, 7000, 1.0,
    0, 8000, 1.0,
    0, 9000, 1.0,
    0, 10000, 1.0,

    //
    1,  400, 0.5,
    6,  600, 1.0,
    1,
};

const float aeq_Weight_M[] = { //354
    0.000, 6.000, 6.000, 6.000, 6.00,  6.00,  8.00,  8.00,  8.000, 8.000, 5.000, 5.000, 5.000, 5.000, 5.000,
    2.000, 2.000, 2.000, 2.000, 2.00,  2.00,  2.00,  2.00,  1.000, 1.000, 1.000, 0.000, 0.000, 0.000, 0.000,
    0.000, 0.000, 0.000, 0.000, 0.00,  0.00,  0.00,  0.00,  0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,
    0.000, 0.000, 0.000, 0.000, 1.00,  0.00,  0.00,  0.00,  0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,
};

const float AEQ_Gold_csv_M[] = {
    -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
    -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0,
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0,
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0,
};

const float aeq_degree_set_0[] = {
    3, -3, 50, 2200, 50, 2700, 5,
};

const int   AEQ_IIR_NUM_FLEX = 2;
const int   AEQ_IIR_NUM_FIX  = 8;
const int   AEQ_IIR_COEF = AEQ_IIR_NUM_FLEX * 3 + 1;
const float AEQ_FSTOP_IDX = 2000;
const float AEQ_FSTOP_IDX2 = 2000;
const int   AEQ_ITER_MAX  = 30;

#endif

